<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<body>
	<ui:composition>
		<p:panel id="painelEditar">

			<f:facet name="header">
				<h:outputText value="#{lbls.LBL_0017}" />
			</f:facet>

			<div>
				<h:outputText value="#{lbls.LBL_0005}:"
					rendered="#{manterGrupoMB.editarState}" />
			</div>
			<div>
				<h:outputText value="#{manterGrupoMB.entidade.id}"
					styleClass="dadosUsuario" rendered="#{manterGrupoMB.editarState}" />
			</div>

			<table cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td colspan="2"><div style="width: 420px;">
							<h:outputLabel for="txtGrupoNome" value="#{lbls.LBL_0010}" />

							<p:inputText value="#{manterGrupoMB.entidade.nome}"
								id="txtGrupoNome" label="#{lbls.LBL_0010}" style="width:400px;" />
						</div></td>
				</tr>
				<tr>
					<td><h:selectBooleanCheckbox id="chkAtivado"
							rendered="#{manterGrupoMB.editarState}"
							value="#{manterGrupoMB.entidade.ativo}" /></td>
					<td><h:outputLabel for="chkAtivado" value="#{lbls.LBL_0113}"
							rendered="#{manterGrupoMB.editarState}" /></td>
				</tr>
			</table>

			<f:facet name="footer">
				<p:commandButton value="#{lbls.LBL_0002}" process="painelEditar"
					update="@form" icon="ui-icon-check"
					action="#{manterGrupoMB.doSalvarAction}" />

				<p:commandButton icon="ui-icon-trash" value="#{lbls.LBL_0013}"
					rendered="#{manterGrupoMB.editarState}"
					onclick="confirRemoverEditar.show()" />

				<p:commandButton value="#{lbls.LBL_0015}" process="@this"
					update="@form" icon="ui-icon-cancel"
					action="#{manterGrupoMB.doPesquisarAction}" />
			</f:facet>

		</p:panel>
		<p:confirmDialog message="#{msgs.MSG_0002}" header="#{msgs.MSG_0003}"
			severity="alert" appendToBody="true" widgetVar="confirRemoverEditar">

			<p:commandButton value="#{lbls.LBL_0011}" process="@this"
				update="@form" oncomplete="confirRemoverEditar.hide()"
				action="#{manterGrupoMB.doRemoverAction}" />

			<p:commandButton value="#{lbls.LBL_0012}"
				onclick="confirRemoverEditar.hide()" type="button" />
		</p:confirmDialog>
	</ui:composition>
</body>
</html>

